Skip to content

Remove tox from various scripts#45756

Open
JennyPng wants to merge 7 commits intoAzure:mainfrom
JennyPng:remove-tox-scripts
Open

Remove tox from various scripts#45756
JennyPng wants to merge 7 commits intoAzure:mainfrom
JennyPng:remove-tox-scripts

Conversation

@JennyPng
Copy link
Member

@JennyPng JennyPng commented Mar 17, 2026

Related to #42858

usages of tox addressed:

  • delete invoke-tox-parallel.ps1
  • replace tox mention in vnext_issue issue description
  • rename 'tox' mentioning vars in set_checks.py
    • rename ToxTestEnv CI parameter across yml files, related to ^
  • update package_utils.py invocation of breaking
  • remove unnecessary uses of TOX_PIP_IMPL (setting it to uv when invoking dispatch_checks in CI yml files - it would already be set to uv by azpysdk/main)
  • remove tox invocation from cosmos-staging.yml
    • delete dispatch_tox.py
      • delete tox_harness.py
      • remove filter_tox_environment_string function from environment_exclusions.py
    • remove tox from ci_tools.txt
    • remove tox from regression_tools.txt

todo in a separate PR

  • rename ToxEnvParallel
  • rename TOX_PIP_IMPL ? (across yml files, azpysdk/main.py)
  • mentions of tox under extend_skip_glob in 3 pyproject.tomls
  • move run_coverage.py out of eng/tox
    • delete entire eng/tox folder
    • delete create_coverage.py ?
  • remove unnecessary mentions of tox across code comments

pipeline check

@JennyPng JennyPng marked this pull request as ready for review March 18, 2026 21:16
@JennyPng JennyPng requested review from a team, benbp, mccoyp, scbedd and weshaggard as code owners March 18, 2026 21:16
Copilot AI review requested due to automatic review settings March 18, 2026 21:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the repo-wide move away from tox by removing tox-based CI scripts/variables and switching remaining usage to azpysdk-based check execution.

Changes:

  • Replaces tox invocations/variables in pipeline templates with azpysdk/checks terminology (e.g., ToxTestEnvCheckEnv, toxenvchecks).
  • Deletes legacy tox dispatch/harness scripts and removes related helper logic.
  • Removes tox from tooling requirement files and the azure-sdk-tools optional dependency list.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/cosmos/cosmos-staging.yml Switches Cosmos staging job from tox to azpysdk whl.
scripts/devops_tasks/tox_harness.py Deletes legacy tox harness implementation.
scripts/devops_tasks/dispatch_tox.py Deletes legacy tox dispatch entrypoint.
eng/tools/azure-sdk-tools/pyproject.toml Removes tox from the sdkgenerator extra.
eng/tools/azure-sdk-tools/packaging_tools/package_utils.py Updates breaking-change invocation to use azpysdk.
eng/tools/azure-sdk-tools/gh_tools/vnext_issue_creator.py Updates issue template instructions from tox to azpysdk.
eng/tools/azure-sdk-tools/ci_tools/environment_exclusions.py Removes tox-environment filtering helper tied to the deleted harness.
eng/scripts/set_checks.py Renames “tox env” handling to “checks” and updates output variable name.
eng/scripts/invoke-tox-parallel.ps1 Deletes legacy tox parallel dispatcher script.
eng/regression_tools.txt Removes tox pin from regression tooling requirements.
eng/ci_tools.txt Removes tox pin from CI tooling requirements.
eng/pipelines/templates/steps/run_pyright.yml Removes TOX-specific env overrides from pyright step.
eng/pipelines/templates/steps/run_pylint.yml Removes TOX-specific env overrides from pylint step.
eng/pipelines/templates/steps/run_mypy.yml Removes TOX-specific env overrides from mypy step.
eng/pipelines/templates/steps/run_breaking_changes.yml Removes TOX-specific env overrides from breaking-changes step.
eng/pipelines/templates/steps/run_black.yml Removes TOX-specific env overrides from black step.
eng/pipelines/templates/steps/run_bandit.yml Removes TOX-specific env overrides from bandit step.
eng/pipelines/templates/steps/build-test.yml Renames parameter ToxTestEnvCheckEnv and uses --checks accordingly.
eng/pipelines/templates/steps/build-extended-artifacts.yml Removes TOX-specific env overrides from docs build step.
eng/pipelines/templates/steps/analyze.yml Removes TOX-specific env overrides from analysis steps.
eng/pipelines/templates/stages/archetype-sdk-tests.yml Renames stage parameter ToxTestEnvCheckEnv.
eng/pipelines/templates/jobs/live.tests.yml Renames job parameter ToxTestEnvCheckEnv.
eng/pipelines/templates/jobs/ci.tests.yml Wires CheckEnv from $(checks) instead of $(toxenv).
Comments suppressed due to low confidence (1)

scripts/devops_tasks/dispatch_tox.py:1

  • This script is being deleted, but there are still pipeline definitions in the repo that invoke scripts/devops_tasks/dispatch_tox.py (e.g., eng/pipelines/generate-all-docs.yml, eng/pipelines/templates/jobs/tests-nightly-python.yml, and eng/pipelines/templates/steps/release-candidate-steps.yml). Removing it without updating/removing those callers will break those pipelines. Either update those pipelines to use eng/scripts/dispatch_checks.py / azpysdk, or keep a small compatibility shim that forwards to the new entrypoint.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 30 to 34
script: >-
cd ./sdk/cosmos/azure-cosmos
pip install tox==4.5.0
tox -c ../../../eng/tox/tox.ini --root . -e whl -- -k 'not cosmosEmulator and not cosmosMultiRegion and not cosmosCircuitBreaker and not cosmosCircuitBreakerMultiRegion'
azpysdk whl --pytest-args -k 'not cosmosEmulator and not cosmosMultiRegion and not cosmosCircuitBreaker and not cosmosCircuitBreakerMultiRegion'
env:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually know where this yml file is used

Comment on lines 33 to 38
def change_log_new(package_folder: str, lastest_pypi_version: bool) -> str:
os.chdir(package_folder)
cmd = f"{sys.executable} -m tox run -c ../../../eng/tox/tox.ini --root . -e breaking -- --changelog "
cmd = "azpysdk breaking --changelog"
if lastest_pypi_version:
cmd += "--latest-pypi-version"
cmd += " --latest-pypi-version"
try:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about this but it def can't be invoked as <executable> -m azpysdk bc it's not a module

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants